package com.zbkj.admin.service;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import com.mybatisflex.core.service.IService;
import com.zbkj.admin.pojo.EbUserVoucherRecordEntity;
import net.dreamlu.mica.core.result.R;

import java.math.BigDecimal;
import java.time.LocalDateTime;

public interface EbUserVoucherRecordService extends IService<EbUserVoucherRecordEntity>, BaseService<EbUserVoucherRecordEntity> {


    /**
     * 获取用户额度
     * @return 用户总额度
     */
    R<BigDecimal> limit();


    /**
     * 数据分页
     *
     * @param page      分页信息
     * @param state     分红状态
     * @param startDate 开始时间
     * @param endDate   结束时间
     * @return 分页数据
     */
    R<PageInfo<EbUserVoucherRecordEntity>> page(Page<EbUserVoucherRecordEntity> page, Integer state,
                                                LocalDateTime startDate, LocalDateTime endDate);

}
